<html>
<head><meta charset="utf-8"><title>Meeting 2020-11-30 · project-portable-simd · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/index.html">project-portable-simd</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html">Meeting 2020-11-30</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="218345166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218345166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218345166">(Nov 30 2020 at 20:59)</a>:</h4>
<p>Hello everyone. I expect everyone might have been pretty busy trying to not go crazy the past week, or maybe I just think that because I'm an American who was indeed kinda busy trying not to go crazy, but if anyone has anything to catch up on the floor is open. I actually managed to fix whatever brain-bug was stopping me from looking at code, uh, sometime last night lol, and am actually working through the "simple, quick" PR I intended to do.</p>



<a name="218345983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218345983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218345983">(Nov 30 2020 at 21:05)</a>:</h4>
<p>All I have to report is that <a href="https://github.com/rust-lang/stdsimd/pull/44">https://github.com/rust-lang/stdsimd/pull/44</a> is now passing</p>



<a name="218346107"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218346107" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218346107">(Nov 30 2020 at 21:06)</a>:</h4>
<p>There's potentially some discussion left on how to name the masks, but I think we can also save that for later</p>



<a name="218346175"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218346175" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218346175">(Nov 30 2020 at 21:07)</a>:</h4>
<p>(I think some min_const_generic type interface will probably mess that all up anyway)</p>



<a name="218346237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218346237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218346237">(Nov 30 2020 at 21:07)</a>:</h4>
<p>sweet bikeshed man let's paint it hot pink.</p>



<a name="218346741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218346741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218346741">(Nov 30 2020 at 21:11)</a>:</h4>
<p>Yeah let's talk about that actually since we're both here.</p>



<a name="218346843"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218346843" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218346843">(Nov 30 2020 at 21:12)</a>:</h4>
<p>What might we want that to look like?<br>
Maskx4&lt;16&gt;?<br>
mask16&lt;4&gt;?</p>



<a name="218346994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218346994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218346994">(Nov 30 2020 at 21:13)</a>:</h4>
<p>I think we bandied about vf32&lt;4&gt;?</p>



<a name="218347117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347117">(Nov 30 2020 at 21:14)</a>:</h4>
<p>I'm not sure, I think we could have something like MaskM&lt;N&gt;</p>



<a name="218347158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347158">(Nov 30 2020 at 21:15)</a>:</h4>
<p>Well I'm not sure</p>



<a name="218347177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347177">(Nov 30 2020 at 21:15)</a>:</h4>
<p>I believe we agreed that Simd&lt;f32, 4&gt; was going a bit far so we were thinking about stuff more like vf32 or Vx4&lt;f32&gt;.</p>



<a name="218347223"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347223" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347223">(Nov 30 2020 at 21:15)</a>:</h4>
<p>Uint32&lt;4&gt;?</p>



<a name="218347292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347292">(Nov 30 2020 at 21:16)</a>:</h4>
<p>The type should probably indicate that it's a vector</p>



<a name="218347334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347334">(Nov 30 2020 at 21:16)</a>:</h4>
<p>yeah, thus vf32 over f32.</p>



<a name="218347343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347343">(Nov 30 2020 at 21:16)</a>:</h4>
<p>Too subtle?</p>



<a name="218347390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347390">(Nov 30 2020 at 21:17)</a>:</h4>
<p>SimdF32?</p>



<a name="218347397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347397">(Nov 30 2020 at 21:17)</a>:</h4>
<p>Yeah, I think for the generic types that could be confusing</p>



<a name="218347421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347421">(Nov 30 2020 at 21:17)</a>:</h4>
<p>An f32x4 type alias is probably fine</p>



<a name="218347513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347513">(Nov 30 2020 at 21:18)</a>:</h4>
<p><em>nod</em></p>



<a name="218347554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347554">(Nov 30 2020 at 21:18)</a>:</h4>
<p>so just name it whatever and let the type alias pick up the nomenclature slack?</p>



<a name="218347601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347601">(Nov 30 2020 at 21:19)</a>:</h4>
<p>Maybe. Uint32Vector&lt;N&gt;?</p>



<a name="218347664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347664">(Nov 30 2020 at 21:19)</a>:</h4>
<p>Hmm, I think Simd{U,F,I}{16,32,64}&lt;N&gt; make slightly more sense here.</p>



<a name="218347765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347765">(Nov 30 2020 at 21:20)</a>:</h4>
<p>because of our slightly unfortunate choice to name our dynamic array type Vec</p>



<a name="218347784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347784">(Nov 30 2020 at 21:20)</a>:</h4>
<p>That's true</p>



<a name="218347823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347823">(Nov 30 2020 at 21:21)</a>:</h4>
<p>Yeah I meant U32 not Uint32, been writing c++ all day <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="218347832"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347832" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347832">(Nov 30 2020 at 21:21)</a>:</h4>
<p>ahaha.</p>



<a name="218347841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347841">(Nov 30 2020 at 21:21)</a>:</h4>
<p>that's fair.</p>



<a name="218347938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218347938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218347938">(Nov 30 2020 at 21:22)</a>:</h4>
<p>Simd&lt;[f32;4]&gt; is <em>close</em> to the API we want, it's just too many abstraction levels deep, basically, so just shuffling the type letters leftwards should make things work alright.</p>



<a name="218348164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218348164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218348164">(Nov 30 2020 at 21:24)</a>:</h4>
<p>shitposty: f32x&lt;4&gt;</p>



<a name="218348168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218348168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218348168">(Nov 30 2020 at 21:24)</a>:</h4>
<p>Lol</p>



<a name="218348207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218348207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218348207">(Nov 30 2020 at 21:25)</a>:</h4>
<p>I'm not completely opposed to having the type be generic as well. It would certainly make some things easier</p>



<a name="218348234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218348234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218348234">(Nov 30 2020 at 21:25)</a>:</h4>
<p>award winning API design right there.</p>



<a name="218348246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218348246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218348246">(Nov 30 2020 at 21:25)</a>:</h4>
<p>what things would it make easier do you think?</p>



<a name="218348262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218348262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218348262">(Nov 30 2020 at 21:26)</a>:</h4>
<p>Though with const generics I think it could just be Simd&lt;f32, 4&gt; which is easier to read</p>



<a name="218348319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218348319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218348319">(Nov 30 2020 at 21:26)</a>:</h4>
<p>It would be easier to make code like num-traits</p>



<a name="218348348"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218348348" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218348348">(Nov 30 2020 at 21:26)</a>:</h4>
<p>Any traits over the type</p>



<a name="218348441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218348441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218348441">(Nov 30 2020 at 21:27)</a>:</h4>
<p>Mmm, I guess we could do stuff like SimdF&lt;32, 4&gt;</p>



<a name="218348491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218348491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218348491">(Nov 30 2020 at 21:27)</a>:</h4>
<p>That's... Scary</p>



<a name="218348591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218348591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218348591">(Nov 30 2020 at 21:28)</a>:</h4>
<p>I am not sure how abstracting over Simd&lt;f32, 4&gt; and Simd&lt;f64, 2&gt; and say hypothetically Simd&lt;f16, 16&gt; in your design would work?</p>



<a name="218348644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218348644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218348644">(Nov 30 2020 at 21:28)</a>:</h4>
<p>but that might just be my brain refusing to recall all my const generics knowledge into memory just right now.</p>



<a name="218349008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218349008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218349008">(Nov 30 2020 at 21:31)</a>:</h4>
<p>I think the idea is that some impls would be for specific types, and some would not</p>



<a name="218349105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218349105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218349105">(Nov 30 2020 at 21:32)</a>:</h4>
<p>hmm.</p>



<a name="218349188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218349188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218349188">(Nov 30 2020 at 21:32)</a>:</h4>
<p>I think the widths should not matter at all since the compiler intrinsics hopefully would support any width (or at least any power of two?)</p>



<a name="218349269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218349269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218349269">(Nov 30 2020 at 21:33)</a>:</h4>
<p>Should.</p>



<a name="218349436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218349436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218349436">(Nov 30 2020 at 21:35)</a>:</h4>
<p>And we can use const wellformedness to make sure that it's some 2.pow(N).</p>



<a name="218349602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218349602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> novacrazy <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218349602">(Nov 30 2020 at 21:36)</a>:</h4>
<p>Hello! I'm new here, and haven't looked into this project specifically much yet, but I do have extensive experience writing SIMD frameworks and working with <code>packed_simd</code>. Would it be okay to bring up some concerns I have based on what I've seen so far and with <code>packed_simd</code>? If you'd like, I can also point towards my WIP portable SIMD framework if that could be used as inspiration.</p>



<a name="218349615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218349615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218349615">(Nov 30 2020 at 21:36)</a>:</h4>
<p>Yep.  We can probably add some custom compiler behavior to make everything error pretty if you use the wrong types or sizes</p>



<a name="218349704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218349704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218349704">(Nov 30 2020 at 21:37)</a>:</h4>
<p><span class="user-mention" data-user-id="245942">@novacrazy</span> yes, concerns with packed_simd are definitely welcome.</p>



<a name="218349846"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218349846" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218349846">(Nov 30 2020 at 21:38)</a>:</h4>
<p><span class="user-mention" data-user-id="245942">@novacrazy</span> sure! packed_simd is not our only reference point so you might mention something we're already leaning away from but we are still looking at it along with other things, and I am definitely listening.</p>



<a name="218350712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218350712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218350712">(Nov 30 2020 at 21:46)</a>:</h4>
<p>I think the biggest problem with abstracting over types entirely is that it... OK this might just be me but  Simd&lt;u32, 4&gt; and SimdU32&lt;4&gt; <em>say something different</em> about how interchangeable that u32 is supposed to be? Like, implicitly it's "just" a type parameter but the idea that it's parameterized sends a stronger message of "you can put anything here and it will work" and I think that risks being a little deceptive about the underlying realities of the machine. Yes, we're abstracting over that, but we want to be careful about where we layer that more deeply.</p>



<a name="218350764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218350764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218350764">(Nov 30 2020 at 21:47)</a>:</h4>
<p>I might feel different about how it actually works out in practice tho'.</p>



<a name="218350784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218350784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218350784">(Nov 30 2020 at 21:47)</a>:</h4>
<p>Ok I agree with that.</p>



<a name="218350808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218350808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218350808">(Nov 30 2020 at 21:48)</a>:</h4>
<p>It's not really generic, it just supports many types</p>



<a name="218350923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218350923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218350923">(Nov 30 2020 at 21:48)</a>:</h4>
<p>I think I'm already talked out of it</p>



<a name="218351634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218351634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> novacrazy <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218351634">(Nov 30 2020 at 21:54)</a>:</h4>
<p>Basically, there are a few deal-breakers when working with simple "portable" SIMD, mostly to do with dynamic dispatch and <code>#[target_feature]</code> attributes. Unless all code is inlined into the single call site under target-feature, the code will deoptimize to the lowest instruction set enabled globally, probably SSE or SSE2 (can't remember which is the default for rustc). Of course, if you use any kind of recursion, that will break the optimizations instantly. SIMDeez suffers from this as well.</p>
<p>As a point of reference, in the project I'm working on (<a href="https://github.com/raygon-renderer/thermite">https://github.com/raygon-renderer/thermite</a>), I solve this by relying on a generic parameter to supply the instruction set to a match statement generated by a procedural macro that dispatches to inner functions annotated with the correct target_feature. All functions end up monomorphized to the correct instruction set and dispatch to only the single instruction set given by the generic parameter.</p>
<p>Secondly, crossing instructions between integer and floating values will incur a 1-4 cycle delay on most modern CPUs, as it has to copy values between the domains. Casting bits between float and int for bitwise operations can incur this overhead, so exposing the floating point bitwise instructions would be nice. This can also affect your mask types.</p>
<p>Next, some of the codegen for the LLVM platform intrinsics is sub-optimal and "too safe", such as with <code>simd_select</code>, which will generate a comparison instruction first to ensure all bits in the mask are the same. Casts could use work, too. </p>
<p>Finally, exposing bitwise operations on float vectors is a must. Getting the sign from a float vector with <code>&amp; -0.0</code> and using it to flip the signs in other float vectors with XOR is much, much more efficient than getting a signum and multiplying. Multiplication is like 5 cycles, while XOR is 1 cycle.</p>



<a name="218351919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218351919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> novacrazy <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218351919">(Nov 30 2020 at 21:57)</a>:</h4>
<p>If you want to support multiple instruction sets in a single binary, it must monomorphize the functions somehow, and I haven't seen much discussion around that in std. Though like I said, I haven't been paying attention until recently.</p>



<a name="218352390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218352390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218352390">(Nov 30 2020 at 22:01)</a>:</h4>
<p>So, the vagaries of multiversioning are in fact explicitly out of scope for this project. The goal is to cross a very specific finish line, which is that there is a safe portable SIMD API. Fixing target_feature or LLVM deoptimization bugs are not our primary concern except insofar as we must account for future solutions (or lack thereof) to those in our API.</p>



<a name="218352992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218352992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> novacrazy <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218352992">(Nov 30 2020 at 22:07)</a>:</h4>
<p>I see. That's unfortunate.</p>



<a name="218353159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218353159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218353159">(Nov 30 2020 at 22:08)</a>:</h4>
<p>It is indeed! This is not even a scope limitation out of <strong>lack of interest</strong>, no, it's because every SIMD project to date has tilted at this windmill and then suddenly taken on all the problems with SIMD at once, been crushed by how demoralizing that was, and died. Figuratively speaking. At least, I think the last person who tried is still alive. It's 2020, so I don't know for sure.</p>
<p>We have even had discussions about cutting many features in our API that would otherwise be considered essential, even by just a hypothetical average portable SIMD API user, just to be able to touch that milestone, and we have already encountered lots of Fun additional difficulties that would otherwise be out of scope but we have to resolve anyways.</p>



<a name="218353584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218353584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218353584">(Nov 30 2020 at 22:11)</a>:</h4>
<p>This leaves your concern about bitwise ops on SIMD vectors of floats, which is something we will have to evaluate given that uh, Floats Are Hard, but seems like a reasonable request nonetheless!</p>



<a name="218353936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218353936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> novacrazy <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218353936">(Nov 30 2020 at 22:13)</a>:</h4>
<p>There are specific bitwise instructions for float vectors, so as to not incur the cross-domain penalty. They just aren't exposed in the (rather-limited) platform intrinsics. <code>simd_fabs</code> uses such instructions to clear the sign bit, for example.</p>



<a name="218354151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218354151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218354151">(Nov 30 2020 at 22:16)</a>:</h4>
<p>LLVM is generally very intelligent about using the best operation based on the domain</p>



<a name="218354263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218354263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218354263">(Nov 30 2020 at 22:16)</a>:</h4>
<p>Yeah, we're already stuck with "we're gonna have to add more platform intrinsics just to get our API to work at a baseline level of functionality" so I guess that's implicitly in scope even though it's "not supposed to be" so I think what I'm going to do is file an issue for collecting platform intrinsics we already know we should add to rustc into a list, and people can just throw their comments at that.</p>



<a name="218354280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218354280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218354280">(Nov 30 2020 at 22:17)</a>:</h4>
<p>so we have a nice referenceable list.</p>



<a name="218354343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218354343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218354343">(Nov 30 2020 at 22:17)</a>:</h4>
<p>oh snap Caleb beat me to it, <a href="https://github.com/rust-lang/stdsimd/issues/46">https://github.com/rust-lang/stdsimd/issues/46</a></p>



<a name="218354457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218354457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218354457">(Nov 30 2020 at 22:18)</a>:</h4>
<p>Hehe</p>



<a name="218355335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218355335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> novacrazy <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218355335">(Nov 30 2020 at 22:25)</a>:</h4>
<p>Well, consider this: <a href="https://godbolt.org/z/zeWeas">https://godbolt.org/z/zeWeas</a></p>
<p>Simply flipping the sign of one based on the other. LLVM does not correctly optimize it at all. Recently I had a real-world problem run into this, and was able to shave off dozens of cycles by switching to bitwise ops with the sign bit.</p>



<a name="218355888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218355888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218355888">(Nov 30 2020 at 22:30)</a>:</h4>
<p>Yeah, "LLVM is kinda short-sighted sometimes" is kind of why we're trying to furnish an explicitly vectorizing API anyways so I am not going to pretend LLVM is necessarily going to take care of every issue here, only that uh, sometimes an LLVM bug is still an LLVM bug.</p>
<p><span class="user-mention" data-user-id="245942">@novacrazy</span> You likely know more than I do about all the ops that are supported by LLVM (and especially, all the ones that are actually <strong>needed</strong> in practice), so I would encourage you to add a comment to stdsimd#46 there, or file another issue.</p>
<p>For other concerns, esp. insofar as they hit existing specific technical deficiencies of the compiler, I suggest filing an issue on rust-lang/rust and we will keep an eye on it. Though I expect the inadequacies of simd_select in particular might get punted to LLVM's fora.</p>



<a name="218356219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218356219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218356219">(Nov 30 2020 at 22:33)</a>:</h4>
<p>Also this meeting has run a bit long so to formally state it: adjourned. Thanks for coming and thanks for staying with us. <span aria-label="sparkling heart" class="emoji emoji-1f496" role="img" title="sparkling heart">:sparkling_heart:</span></p>



<a name="218356816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218356816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218356816">(Nov 30 2020 at 22:40)</a>:</h4>
<p><span class="user-mention" data-user-id="245942">@novacrazy</span> I'm not sure that was necessarily a fair comparison.  LLVM is certainly worse at optimizing certain operations than others (in this case it may not have been allowed to make the optimization because of some floating-point consideration).  If you change the generic code to use <code>and</code> and <code>xor</code> directly LLVM uses the correct domain instructions: <a href="https://godbolt.org/z/4v8Y7q">https://godbolt.org/z/4v8Y7q</a></p>



<a name="218402364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/Meeting%202020-11-30/near/218402364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/Meeting.202020-11-30.html#218402364">(Dec 01 2020 at 10:18)</a>:</h4>
<p><span class="user-mention" data-user-id="245942">@novacrazy</span> IIRC <code>x &lt; 0.0</code> is <em>not</em> the same as getting the sign bit, since <code>-0.0</code> is not less than <code>0.0</code>.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>